package com.nycreativity.elecreativity.mapper;

import com.nycreativity.elecreativity.entity.po.ShoppingCart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.nycreativity.elecreativity.entity.vo.shoppingcart.ShoppingCartItemVO
import org.apache.ibatis.annotations.Param

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author sxt && ttxxi
 * @since 2021-03-11
 */
interface ShoppingCartMapper : BaseMapper<ShoppingCart> {

    /**
     * 查询当前用户的购物车信息
     * @param page Page<Any> 分页参数
     * @param userId Long? 当前用户id
     * @return IPage<ShoppingCartItemVO> 购物车信息查询VO集合
     */
    fun selectShoppingCartInfo(page: Page<Any>, @Param("userId") userId: Long?): IPage<ShoppingCartItemVO>
}
